{% extends 'base.html' %}

{% block css %}
    <link rel="stylesheet" href="/static/css/select2.min.css">
{% endblock %}

{% block content %}
    <section class="content-header">
        <h1>
            资产添加
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-server"></i> 资产管理</a>
            <li><a href="{% url 'assets:asset_list' %}"> 资产</a></li>
            <li class="active"><a href="#">资产添加</a></li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <!-- Small boxes (Stat box) -->
        <div class="row">
            <div class="col-md-10 col-md-offset-1">
                <!-- general form elements disabled -->
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">请填写资产信息</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <form action="{% url 'assets:asset_add' %}" class="form-horizontal" method="POST">
                            <!-- text input -->
                            {% csrf_token %}
                            {% for asset_val in form %}
                                <div class="form-group">
                                    <div class="col-md-2 control-label">
                                        {{ asset_val.label }}
                                    </div>
                                    <div class="col-md-8">
                                        <p>{{ asset_val }}</p>
                                    </div>
                                </div>
                            {% endfor %}
                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">提 交</button>
                            </div>
                        </form>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
        </div>
    </section>
{% endblock %}

{% block js %}
    <!-- Select2 -->
    <script src="/static/js/select2.full.min.js"></script>
    <script src="/static/js/moment.min.js"></script>
    <!-- InputMask -->

    <script src="/static/plugins/input-mask/jquery.inputmask.js"></script>
    <script src="/static/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
    <script src="/static/plugins/input-mask/jquery.inputmask.extensions.js"></script>
    <script>
        $(function () {
            $('.select2').select2();
            $('[data-mask]').inputmask();
        });
        $(document).ready(function () {
            $('#g-2').addClass('active');
            $('#g-2-1').addClass('active');
        });
    </script>
{% endblock %}
